<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Kota_user extends Authenticated_Controller{
	
	function __construct() {
		parent::__construct();
		$this->load->model('kota_user_model','kota');
                $this->load->model('fee_driver_model','fee');
		$this->data['opt']=$this->fee->get_asal_tujuan();
	}
	
	function index(){
		$this->list_kota_user();
	}
	
	function list_kota_user(){
		$data['daftar_kota_user'] = $this->kota->get_all();
		$this->load->view('template/header_view');
		$this->load->view('kota_user/daftar_kota_user',$data);
		$this->load->view('template/footer_view');
	}
	
	function form_edit_kota_user($id){
		$data = $this->kota->get_one($id);
                $data['daftar_asal_tujuan'] = $this->fee->get_asal_tujuan();

		$this->load->view('template/header_view');
		$this->load->view('kota_user/form_kota_user',$data);
		$this->load->view('template/footer_view');
	}
	
	function process_edit_kota_user($id){
		$this->kota->insert_user($this->input->post('id'),$this->input->post('kota'));
		redirect(KOTA);
	}
}

/* End of file home.php */
/* Location: ./application/controllers/home.php */
